package com.gitee.funcy.disruptorlearn.ch03.sigle;

import com.lmax.disruptor.EventHandler;
import java.util.UUID;

/**
 * @author fangchengyan
 * @date 2019-03-15 18:17
 */
public class Handler2 implements EventHandler<Trade> {

    @Override
    public void onEvent(Trade trade, long l, boolean b) throws Exception {
        System.out.println("handler 2 : set id");
        Thread.sleep(2000);
        trade.setId(UUID.randomUUID().toString());
    }
}
